What did Rich Hickey mean when he said, "All that specificity [of interfaces/classes/types] kills your reuse!"
Posted
by
GlenPeterson
on Programmers
See other posts from Programmers
or by GlenPeterson
Published on 2013-05-23T22:29:18Z
Indexed on
2013/06/27
16:28 UTC
Read the original article
Hit count: 253
In Rich Hickey's thought-provoking goto conference keynote "The Value of Values" at 29 minutes he's talking about the overhead of a language like Java and makes a statement like, "All those interfaces kill your reuse." What does he mean? Is that true?
In my search for answers, I have run across:
The Principle of Least Knowledge AKA The Law of Demeter which encourages airtight API interfaces. Wikipedia also lists some disadvantages.
Kevlin Henney's Imperial Clothing Crisis which argues that use, not reuse is the appropriate goal.
Jack Diederich's "Stop Writing Classes" talk which argues against over-engineering in general.
Clearly, anything written badly enough will be useless. But how would the interface of a well-written API prevent that code from being used? There are examples throughout history of something made for one purpose being used more for something else. But in the software world, if you use something for a purpose it wasn't intended for, it usually breaks.
I'm looking for one good example of a good interface preventing a legitimate but unintended use of some code. Does that exist? I can't picture it.
© Programmers or respective owner